home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.04 Apr 96 / ThreadingAppleEvents.sit / ThreadingAppleEvents / Grant's CGI Code 1.0b13 / Interface / DialogFunc.c < prev    next >
MacBinary  |  1995-12-09  |  2.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sat Dec 9 11:47:00 1995, modified Sat Dec 9 11:47:00 1995, creator 'CWIE', type ASCII, 1644 bytes "DialogFunc.c" , at 0x6ec 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 44 69 61 6c 6f 67 | 46 75 6e 63 2e 63 00 00 |..Dialog|Func.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 06 6c 00 | 00 01 9a ac ef 6e 04 ac |......l.|.....n..|
|00000060| ef 6e 04 00 00 04 00 00 | 00 00 00 00 00 00 00 00 |.n......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 76 b4 00 00 |........|....v...|
|00000080| 2f 2a 2a 2a 2a 2a 0d 20 | 2a 0d 20 2a 09 44 69 61 |/*****. |*. *.Dia|
|00000090| 6c 6f 67 46 75 6e 63 2e | 63 0d 20 2a 0d 20 2a 09 |logFunc.|c. *. *.|
|000000a0| 54 68 69 73 20 69 73 20 | 61 20 73 75 70 70 6f 72 |This is |a suppor|
|000000b0| 74 20 66 69 6c 65 20 66 | 6f 72 20 22 47 72 61 6e |t file f|or "Gran|
|000000c0| 74 27 73 20 43 47 49 20 | 46 72 61 6d 65 77 6f 72 |t's CGI |Framewor|
|000000d0| 6b 22 2e 0d 20 2a 09 50 | 6c 65 61 73 65 20 73 65 |k".. *.P|lease se|
|000000e0| 65 20 74 68 65 20 6c 69 | 63 65 6e 73 65 20 61 67 |e the li|cense ag|
|000000f0| 72 65 65 6d 65 6e 74 20 | 74 68 61 74 20 61 63 63 |reement |that acc|
|00000100| 6f 6d 70 61 6e 69 65 73 | 20 74 68 65 20 64 69 73 |ompanies| the dis|
|00000110| 74 72 69 62 75 74 69 6f | 6e 20 70 61 63 6b 61 67 |tributio|n packag|
|00000120| 65 0d 20 2a 09 66 6f 72 | 20 6c 69 63 65 6e 73 69 |e. *.for| licensi|
|00000130| 6e 67 20 64 65 74 61 69 | 6c 73 2e 0d 20 2a 0d 20 |ng detai|ls.. *. |
|00000140| 2a 09 43 6f 70 79 72 69 | 67 68 74 20 a9 31 39 39 |*.Copyri|ght .199|
|00000150| 35 20 62 79 20 47 72 61 | 6e 74 20 4e 65 75 66 65 |5 by Gra|nt Neufe|
|00000160| 6c 64 0d 20 2a 09 67 72 | 61 6e 74 40 61 63 6d 2e |ld. *.gr|ant@acm.|
|00000170| 63 6f 6d 0d 20 2a 09 68 | 74 74 70 3a 2f 2f 61 72 |com. *.h|ttp://ar|
|00000180| 70 70 31 2e 63 61 72 6c | 65 74 6f 6e 2e 63 61 2f |pp1.carl|eton.ca/|
|00000190| 67 72 61 6e 74 2f 0d 20 | 2a 0d 20 2a 2a 2a 2a 2a |grant/. |*. *****|
|000001a0| 2f 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 4d 79 43 |/..#incl|ude "MyC|
|000001b0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 2e 68 22 0d |onfigura|tion.h".|
|000001c0| 23 69 66 20 6b 43 6f 6d | 70 69 6c 65 57 69 74 68 |#if kCom|pileWith|
|000001d0| 46 6f 72 65 67 72 6f 75 | 6e 64 0d 0d 23 69 6e 63 |Foregrou|nd..#inc|
|000001e0| 6c 75 64 65 20 3c 54 68 | 72 65 61 64 73 2e 68 3e |lude <Th|reads.h>|
|000001f0| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 63 6f 6d 70 |..#inclu|de "comp|
|00000200| 69 6c 65 72 5f 73 74 75 | 66 66 2e 68 22 0d 23 69 |iler_stu|ff.h".#i|
|00000210| 6e 63 6c 75 64 65 20 22 | 63 6f 6e 73 74 61 6e 74 |nclude "|constant|
|00000220| 73 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 67 |s.h".#in|clude "g|
|00000230| 6c 6f 62 61 6c 73 2e 68 | 22 0d 0d 23 69 6e 63 6c |lobals.h|"..#incl|
|00000240| 75 64 65 20 22 45 76 65 | 6e 74 73 2e 68 22 0d 23 |ude "Eve|nts.h".#|
|00000250| 69 6e 63 6c 75 64 65 20 | 22 57 69 6e 64 6f 77 49 |include |"WindowI|
|00000260| 6e 74 2e 68 22 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |nt.h"..#|include |
|00000270| 22 44 69 61 6c 6f 67 46 | 75 6e 63 2e 68 22 0d 0d |"DialogF|unc.h"..|
|00000280| 0d 2f 2a 2a 2a 20 20 46 | 55 4e 43 54 49 4f 4e 53 |./*** F|UNCTIONS|
|00000290| 20 20 2a 2a 2a 2f 0d 0d | 2f 2a 20 54 68 69 73 20 | ***/..|/* This |
|000002a0| 66 75 6e 63 74 69 6f 6e | 20 72 65 73 70 6f 6e 64 |function| respond|
|000002b0| 73 20 74 6f 20 75 70 64 | 61 74 65 2c 20 61 6e 64 |s to upd|ate, and|
|000002c0| 20 61 63 74 69 76 61 74 | 65 20 65 76 65 6e 74 73 | activat|e events|
|000002d0| 2c 20 61 6e 64 20 6b 65 | 79 20 70 72 65 73 73 65 |, and ke|y presse|
|000002e0| 73 2e 0d 09 72 65 74 75 | 72 6e 2c 20 65 6e 74 65 |s...retu|rn, ente|
|000002f0| 72 2c 20 43 6f 6d 6d 61 | 6e 64 2d 2e 20 61 6e 64 |r, Comma|nd-. and|
|00000300| 20 65 73 63 20 73 65 6c | 65 63 74 20 74 68 65 20 | esc sel|ect the |
|00000310| 27 4f 4b 27 20 62 75 74 | 74 6f 6e 2e 20 28 4e 6f |'OK' but|ton. (No|
|00000320| 20 43 61 6e 63 65 6c 20 | 62 75 74 74 6f 6e 29 20 | Cancel |button) |
|00000330| 2a 2f 0d 70 61 73 63 61 | 6c 20 42 6f 6f 6c 65 61 |*/.pasca|l Boolea|
|00000340| 6e 0d 64 65 66 61 75 6c | 74 41 6c 65 72 74 31 42 |n.defaul|tAlert1B|
|00000350| 75 74 74 6f 6e 45 76 65 | 6e 74 46 69 6c 74 65 72 |uttonEve|ntFilter|
|00000360| 20 28 20 44 69 61 6c 6f | 67 50 74 72 20 74 68 65 | ( Dialo|gPtr the|
|00000370| 44 69 61 6c 6f 67 2c 20 | 45 76 65 6e 74 52 65 63 |Dialog, |EventRec|
|00000380| 6f 72 64 20 2a 74 68 65 | 45 76 65 6e 74 2c 20 73 |ord *the|Event, s|
|00000390| 68 6f 72 74 20 2a 69 74 | 65 6d 48 69 74 29 0d 7b |hort *it|emHit).{|
|000003a0| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 72 65 73 75 6c |..Boolea|n..resul|
|000003b0| 74 3b 0d 09 63 68 61 72 | 09 09 6b 65 79 3b 0d 09 |t;..char|..key;..|
|000003c0| 73 68 6f 72 74 09 09 69 | 74 65 6d 54 79 70 65 3b |short..i|temType;|
|000003d0| 0d 09 48 61 6e 64 6c 65 | 09 09 69 74 65 6d 48 61 |..Handle|..itemHa|
|000003e0| 6e 64 6c 65 3b 0d 09 52 | 65 63 74 09 09 69 74 65 |ndle;..R|ect..ite|
|000003f0| 6d 52 65 63 74 3b 0d 09 | 6c 6f 6e 67 09 09 66 69 |mRect;..|long..fi|
|00000400| 6e 61 6c 54 69 63 6b 73 | 3b 0d 09 0d 09 72 65 73 |nalTicks|;....res|
|00000410| 75 6c 74 20 3d 20 66 61 | 6c 73 65 3b 0d 09 0d 09 |ult = fa|lse;....|
|00000420| 73 77 69 74 63 68 20 28 | 20 74 68 65 45 76 65 6e |switch (| theEven|
|00000430| 74 2d 3e 77 68 61 74 20 | 29 0d 09 7b 0d 09 09 63 |t->what |)..{...c|
|00000440| 61 73 65 20 6b 65 79 44 | 6f 77 6e 20 3a 0d 09 09 |ase keyD|own :...|
|00000450| 09 6b 65 79 20 3d 20 28 | 63 68 61 72 29 28 20 74 |.key = (|char)( t|
|00000460| 68 65 45 76 65 6e 74 2d | 3e 6d 65 73 73 61 67 65 |heEvent-|>message|
|00000470| 20 26 20 63 68 61 72 43 | 6f 64 65 4d 61 73 6b 20 | & charC|odeMask |
|00000480| 29 3b 0d 09 09 09 0d 09 | 09 09 69 66 20 28 20 28 |);......|..if ( (|
|00000490| 6b 65 79 20 3d 3d 20 28 | 63 68 61 72 29 6b 52 65 |key == (|char)kRe|
|000004a0| 74 75 72 6e 4b 65 79 29 | 20 7c 7c 20 28 6b 65 79 |turnKey)| || (key|
|000004b0| 20 3d 3d 20 28 63 68 61 | 72 29 6b 45 6e 74 65 72 | == (cha|r)kEnter|
|000004c0| 4b 65 79 29 20 7c 7c 0d | 09 09 09 09 28 6b 65 79 |Key) ||.|....(key|
|000004d0| 20 3d 3d 20 28 63 68 61 | 72 29 6b 45 73 63 61 70 | == (cha|r)kEscap|
|000004e0| 65 4b 65 79 29 20 7c 7c | 0d 09 09 09 09 28 28 6b |eKey) |||.....((k|
|000004f0| 65 79 20 3d 3d 20 28 63 | 68 61 72 29 6b 50 65 72 |ey == (c|har)kPer|
|00000500| 69 6f 64 4b 65 79 29 20 | 26 26 20 28 74 68 65 45 |iodKey) |&& (theE|
|00000510| 76 65 6e 74 2d 3e 6d 6f | 64 69 66 69 65 72 73 20 |vent->mo|difiers |
|00000520| 26 20 63 6d 64 4b 65 79 | 29 29 20 29 0d 09 09 09 |& cmdKey|)) )....|
|00000530| 7b 0d 09 09 09 09 47 65 | 74 44 69 61 6c 6f 67 49 |{.....Ge|tDialogI|
|00000540| 74 65 6d 09 28 20 74 68 | 65 44 69 61 6c 6f 67 2c |tem.( th|eDialog,|
|00000550| 20 6b 44 65 66 61 75 6c | 74 42 75 74 74 6f 6e 49 | kDefaul|tButtonI|
|00000560| 44 2c 20 26 69 74 65 6d | 54 79 70 65 2c 20 26 69 |D, &item|Type, &i|
|00000570| 74 65 6d 48 61 6e 64 6c | 65 2c 20 26 69 74 65 6d |temHandl|e, &item|
|00000580| 52 65 63 74 20 29 3b 0d | 09 09 09 09 48 69 6c 69 |Rect );.|....Hili|
|00000590| 74 65 43 6f 6e 74 72 6f | 6c 09 28 20 28 43 6f 6e |teContro|l.( (Con|
|000005a0| 74 72 6f 6c 48 61 6e 64 | 6c 65 29 69 74 65 6d 48 |trolHand|le)itemH|
|000005b0| 61 6e 64 6c 65 2c 20 6e | 69 6c 20 29 3b 0d 09 09 |andle, n|il );...|
|000005c0| 09 09 44 65 6c 61 79 09 | 09 09 28 20 28 6c 6f 6e |..Delay.|..( (lon|
|000005d0| 67 29 6b 56 69 73 75 61 | 6c 44 65 6c 61 79 2c 20 |g)kVisua|lDelay, |
|000005e0| 26 66 69 6e 61 6c 54 69 | 63 6b 73 20 29 3b 0d 09 |&finalTi|cks );..|
|000005f0| 09 09 09 48 69 6c 69 74 | 65 43 6f 6e 74 72 6f 6c |...Hilit|eControl|
|00000600| 09 28 20 28 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |.( (Cont|rolHandl|
|00000610| 65 29 69 74 65 6d 48 61 | 6e 64 6c 65 2c 20 6e 69 |e)itemHa|ndle, ni|
|00000620| 6c 20 29 3b 0d 09 09 09 | 09 0d 09 09 09 09 72 65 |l );....|......re|
|00000630| 73 75 6c 74 09 09 3d 20 | 74 72 75 65 3b 0d 09 09 |sult..= |true;...|
|00000640| 09 09 2a 69 74 65 6d 48 | 69 74 09 3d 20 28 73 68 |..*itemH|it.= (sh|
|00000650| 6f 72 74 29 6b 44 65 66 | 61 75 6c 74 42 75 74 74 |ort)kDef|aultButt|
|00000660| 6f 6e 49 44 3b 0d 09 09 | 09 7d 0d 09 09 09 62 72 |onID;...|.}....br|
|00000670| 65 61 6b 3b 0d 09 7d 0d | 09 0d 09 72 65 74 75 72 |eak;..}.|...retur|
|00000680| 6e 20 72 65 73 75 6c 74 | 3b 0d 7d 20 2f 2a 20 64 |n result|;.} /* d|
|00000690| 65 66 61 75 6c 74 41 6c | 65 72 74 31 42 75 74 74 |efaultAl|ert1Butt|
|000006a0| 6f 6e 45 76 65 6e 74 46 | 69 6c 74 65 72 20 2a 2f |onEventF|ilter */|
|000006b0| 0d 0d 0d 23 65 6e 64 69 | 66 09 2f 2a 20 6b 43 6f |...#endi|f./* kCo|
|000006c0| 6d 70 69 6c 65 57 69 74 | 68 46 6f 72 65 67 72 6f |mpileWit|hForegro|
|000006d0| 75 6e 64 20 2a 2f 0d 0d | 2f 2a 2a 2a 2a 2a 20 20 |und */..|/***** |
|000006e0| 45 4f 46 20 20 2a 2a 2a | 2a 2a 2f 0d 00 00 00 00 |EOF ***|**/.....|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000710| 00 00 10 59 0b 50 72 69 | 6d 65 72 20 54 65 78 74 |...Y.Pri|mer Text|
|00000720| 02 00 00 00 54 45 58 54 | 50 72 6d 72 01 00 00 34 |....TEXT|Prmr...4|
|00000730| 0c 44 69 61 6c 6f 67 46 | 75 6e 63 2e 63 a3 02 00 |.DialogF|unc.c...|
|00000740| 00 00 54 45 58 54 43 57 | 49 45 00 04 00 00 00 00 |..TEXTCW|IE......|
|00000750| 00 00 54 45 58 54 43 57 | 49 45 00 04 00 00 00 00 |..TEXTCW|IE......|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 aa 21 f4 a3 00 00 | 00 00 00 00 01 9a 00 00 |...!....|........|
|00000780| 00 00 00 00 00 00 06 00 | 00 00 10 5f 00 45 03 00 |........|..._.E..|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 10 13 0e 45 76 65 |........|.....Eve|
|000007a0| 6e 74 54 72 69 67 67 65 | 72 20 c4 00 00 00 00 00 |ntTrigge|r ......|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 11 00 00 00 |........|........|
|000007c0| 10 5f 0b 41 50 45 56 45 | 4e 54 2e 54 58 54 02 00 |._.APEVE|NT.TXT..|
|000007d0| 00 00 54 45 58 54 41 4c | 46 41 01 00 00 9c 00 00 |..TEXTAL|FA......|
|000007e0| 00 00 00 00 10 60 00 00 | 00 00 04 db 00 00 10 00 |.....`..|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 a8 67 5d 45 a8 67 |........|...g]E.g|
|00000800| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 03 | 00 04 00 57 00 05 01 b4 |........|...W....|
|00000830| 02 19 00 57 00 05 01 b4 | 02 19 ac ef 27 5c 00 00 |...W....|....'\..|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00000850| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000860| 00 00 00 46 00 99 3a 08 | 20 b0 00 00 00 1c 00 46 |...F..:.| ......F|
|00000870| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000880| 00 1e 03 ed ff ff 00 00 | 00 00 00 99 39 28 03 f0 |........|....9(..|
|00000890| ff ff 00 00 00 4c 00 99 | 39 20 00 00 00 00 00 00 |.....L..|9 ......|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+